This is a MATLAB implementation of the algorithm developed in the paper:
X.Shi, M.N.Chatzis. 2021. An efficient algorithm to test the observability of rational nonlinear systems with unmeasured inputs, Mechanical Systems and Signal Processing.

The algorithm tests the observability and identifiability of dynamical systems described in the following state-space representation:

dX/dt=F(X,Theta,U,W),
y=h(X,Theta,U,W)

where

X is a vector of n dynamic states: X=[x1,x2,...,xn];
Theta is a vector of l unknown parameters: Theta=[theta1,theta2,...,thetal];
F is a vector of n rational nonlinear functions: F=[f1;f2;...;fn];
h is a vector of m output functions: h=[h1;h2;...;hm];
U is a vector of r measured inputs: U=[u1,u2,...,ur];
W is a vector of nw unmeasured and unknown inputs: W=[w1,w2,...,wnw];

The output of the algorithm accounts for whether the dynamic states, parameters and unmeasured inputs can be identified given the input-output measurements.

The main function to use is: NonlinearObservabilityTest(F,h,X,Theta,U,W,kmax), 
where 'kmax' is the maximum order of the time derivative of unmeasured inputs considered in the augmented state vector, which is chosen by the user.
Normally, it is recommended that kmax=2^i-1>n+l+nw (i=1,2,3,...); if no unmeasured inputs are applied, the default kmax is n+l-1.

The user should start with the file 'Example', where an example is used to illustrate how to use the algorithm.
The example is a 2DOFs mass-spring system driven by measured and unmeasured inputs, as demonstrated in Section 4.1 of the paper.